package com.wjb.xietong.server.task;

import java.util.HashMap;
import java.util.Map;

import com.wjb.xietong.server.IRequestParam;
import com.wjb.xietong.util.IDs;

public class UpdateTaskStatuParam implements IRequestParam {

	private long companyId = 0l;
	/**此项不需要填写**/
	private int deleteFlag = 0; // (1:已删除  暂时不需要填写，默认为0 )
	/**完成任务填写1   取消完成任务填0**/
	private int operationStatus = -1;// ( 0:未完成 1：已完成)
	private long projectId = 0l;
	private long taskId = 0l;
	private long userId = 0l;

	@Override
	public Map<String, String> parseData2Map() {
		Map<String, String> map = new HashMap<String, String>();
		put(map, IDs.M, IDs.MOBILE_SET_TASK);
		put(map, IDs.COM_ID, getCompanyId());
		put(map, IDs.DELETE_FLAG, getDeleteFlag());
		put(map, IDs.OPERATION_STATU, getOperationStatus());
		put(map, IDs.PROJECT_ID, getProjectId());
		put(map, IDs.TASK_ID, getTaskId());
		put(map, IDs.USER_ID, getUserId());
		return map;
	}

	private void put(Map<String, String> map, String key, long value) {
		put(map, key, String.valueOf(value));
	}

	private void put(Map<String, String> map, String key, int value) {
		put(map, key, String.valueOf(value));
	}

	private void put(Map<String, String> map, String key, String value) {
		if (null == key || null == value) {
			return;
		}
		map.put(key, value);
	}

	public long getCompanyId() {
		return companyId;
	}

	public void setCompanyId(long companyId) {
		this.companyId = companyId;
	}

	public int getDeleteFlag() {
		return deleteFlag;
	}

	public int getOperationStatus() {
		return operationStatus;
	}

	public void setOperationStatus(int operationStatus) {
		this.operationStatus = operationStatus;
	}

	public long getProjectId() {
		return projectId;
	}

	public void setProjectId(long projectId) {
		this.projectId = projectId;
	}

	public long getTaskId() {
		return taskId;
	}

	public void setTaskId(long taskId) {
		this.taskId = taskId;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

}
